package com.hdax.dm.feign.item;

import com.hdax.dm.entity.item.DmItemComment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "dm-item-provider")
public interface DmItemCommentFeign {

    /**
     * 根据itemid获取到评论
     * @param itemId
     * @return
     */
    @PostMapping(path = "/comment/dmItemComment")
    List<DmItemComment> dmItemComment(@RequestParam("itemId")Long itemId);

    /**
     * 添加剧评
     * @param dmItemComment
     * @return
     */
    @PostMapping(path = "/comment/addComments")
    int addComments(@RequestBody DmItemComment dmItemComment);
}
